<template>
  <div class="foots">
<van-goods-action>
  <van-goods-action-icon icon="chat-o" text="客服" />
  <van-goods-action-icon icon="cart-o" text="购物车" :info=num  @click="list()"/>
  <van-goods-action-icon icon="shop-o" text="店铺" />
  <van-goods-action-button text="加入购物车" type="warning" @click="acc()"/>
  <van-goods-action-button text="立即购买"  color="red"/>
</van-goods-action>
  </div>
</template>

<script>
import qu from  "@/plugins/quchong.js"
export default {
  name: 'foots',
  data(){
   return{
         num:[]
   }
  },
   methods:{
       acc(){
           this.$store.commit("addcart",this.$route.params.item)
     
            //   console.log(this.$route.params.item)   
       },
        list(){
             this.$router.push({name:"shopcar"})
       }

   },
   mounted(){
     var  a=qu(this.$store.state.data)
           console.log(a.length)
this.num=a.length;
   }
}
</script>
<style  scoped>
.foots{
     background: pink;
    height: 40px;
    width: 100%;
    /* bottom: 0px; */
    position: fixed;
    bottom: 0px;
    left:0px;
      
}
</style>
